import request from '@/utils/request'

export function getList(query) {
  return request({
    url: '/api/exam/list',
    method: 'get',
    params: query
  })
}


export function create(data) {
  return request({
    url: '/api/exam/create',
    method: 'post',
    data
  })
}

export function del(id) {
  return request({
    url: '/api/exam/del',
    method: 'get',
    params: { id }
  })
}


export function all() {
  return request({
    url: '/api/exam/all',
    method: 'get'
  })
}

export function getExams(cate_id,level){
  return request({
    url: '/api/exam/getExams',
    method: 'get',
    params: {
      cate_id:cate_id,
      level:level
    }
  })
}
